package com.max.dto;

import com.max.constants.PublicConstants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@ApiModel("预约DTO")
public class ReservationDTO {

    @NotNull(message = "会议室ID不能为空")
    @ApiModelProperty("会议室ID")
    private Long roomId;

    @ApiModelProperty("预约日期")
    @Pattern(regexp = PublicConstants.datePattern, message = "日期格式不正确")
    private String useDate;

    @ApiModelProperty("预约时间段")
    @NotNull(message = "预约时间段不能为空")
    @Max(value = 23, message = "预约时间段不能超过23时")
    @Min(value = 0, message = "预约时间段不能低于0时")
    private Integer timeNum;

    public Long getRoomId() {
        return roomId;
    }

    public void setRoomId(Long roomId) {
        this.roomId = roomId;
    }

    public String getUseDate() {
        return useDate;
    }

    public void setUseDate(String useDate) {
        this.useDate = useDate;
    }

    public Integer getTimeNum() {
        return timeNum;
    }

    public void setTimeNum(Integer timeNum) {
        this.timeNum = timeNum;
    }
}
